package nancal.mp

import nbcp.myoql.code.generator.db.mysql.*
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.ExtendWith
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.ActiveProfiles
import org.springframework.test.context.junit.jupiter.SpringExtension


/**
 * Created by udi on 17-3-27.
 */


@ExtendWith(SpringExtension::class)
@AutoConfigureMockMvc
@SpringBootTest(classes = arrayOf(AdminMainApplication::class))
@ActiveProfiles("udi")
abstract class TestBase {

    init {
        System.setProperty("app.group", "yuxh");
        System.setProperty("server.db", "mp");

        System.setProperty("app.upload.host", "dev8.cn:9503");
        System.setProperty("app.scheduler", "false");
    }

    val projectPath =  System.getProperty("user.dir")


    @Test
    fun SqlEntity_Generator() {
        SqlDbEntityGenerator.db2Entity().toKotlinCode("a.b")
            .map {
                println(it);
            }
    }

}